/**
 * Copyright (C), 2022-2025, www.bosssof.com.cn
 * @FileName RoleDTO.java
 * @Author chen
 * @Date 2024-5-31  18:08
 * @Description TODO
 * History:
 * <author> chen
 * <time> 2024-5-31  18:08
 * <version> 1.0.0
 * <desc> 该文件定义了前端对角色做增加和修改的时候传递后端的角色DTO对象
 */
package com.bosssoft.g1.dto;

import com.bosssoft.g1.common.data.dto.TenantBaseDTO;
import com.bosssoft.g1.group.CreateGroup;
import com.bosssoft.g1.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * @Class RoleDTO
 * @Description 前端做角色增加和修改的时候传送对象的角色对象
 * @Author chen
 * @Date 2024-5-31  18:08
 * @version 1.0.0
 */
@ApiModel(value="角色管理增加和修改传输对象")
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@Validated
public class RoleDTO extends TenantBaseDTO {

    /**
     *  角色所包含的资源列表
     */
    //private List<ResourceDTO> resourceDTOS=new ArrayList<>();

    /**
     * 角色id
     */
    @ApiModelProperty(value="name角色id")
    @NotNull(groups = UpdateGroup.class)
    private Long id;
    /**
     * 角色名
     */
    @ApiModelProperty(value="name角色名")
    @NotNull(message = "角色名字不能为空")
    private String name;
    /**
     * 角色代码
     */
    @ApiModelProperty(value="code角色代码")
    @NotNull(message = "角色工号不能为空")
    private String code;

    /**
     * 备注
     */
    @ApiModelProperty(value="remark备注")
    private String remark;

    @ApiModelProperty(value="机构名称")
    private String orgName;

    @ApiModelProperty(value="公司名称")
    private String companyName;

    /**
     *  机构
     */
    private OrganizationDTO organizationDTO=new OrganizationDTO();
    /**
     *  公司
     */
    private CompanyDTO companyDTO=new CompanyDTO();

    /**
     * 租户
     */
    private  TenantDTO tenantDTO=new TenantDTO();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public @NotNull(message = "角色名字不能为空") String getName() {
        return name;
    }

    public void setName(@NotNull(message = "角色名字不能为空") String name) {
        this.name = name;
    }

    public @NotNull(message = "角色工号不能为空") String getCode() {
        return code;
    }

    public void setCode(@NotNull(message = "角色工号不能为空") String code) {
        this.code = code;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public OrganizationDTO getOrganizationDTO() {
        return organizationDTO;
    }

    public void setOrganizationDTO(OrganizationDTO organizationDTO) {
        this.organizationDTO = organizationDTO;
    }

    public CompanyDTO getCompanyDTO() {
        return companyDTO;
    }

    public void setCompanyDTO(CompanyDTO companyDTO) {
        this.companyDTO = companyDTO;
    }

    public TenantDTO getTenantDTO() {
        return tenantDTO;
    }

    public void setTenantDTO(TenantDTO tenantDTO) {
        this.tenantDTO = tenantDTO;
    }
/*@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;*/
}
